<?php
/**
 * $Id: borrarMovimiento.json.php 22 2010-07-16 05:09:41Z corlatti $
 * @author Claudio Corlatti
 *
 */
header ( 'Content-type: application/json' );
require '../library/bootstrap/prepend.php';
IncludeHelper::inc ( 'library/dto/response/GenericResponse.class.php' );
IncludeHelper::inc ( 'library/session/CuentasCostos.class.php' );
IncludeHelper::inc ( 'library/session/Caja.class.php' );

$id = $_POST['id'];

$result = new GenericResponse ( );
try {
	
	$caja = new Caja ( );
	
	$caja->checkRequired ( array ('id' => $id) );
	
	$caja->borrarMovimiento($id);
	
	$result->result->set ( true, 'OK' );
	$result->valores[0] = $obj;

} catch ( Exception $e ) {
	
	$result->result->set ( false, $e->getMessage () );

}

echo json_encode ( $result );
?>